﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="query.aspx.cs" Inherits="AnyOffice.general.info.user.query" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>人员查询 </title>
	</HEAD>
	<BODY class="bodycolor" topMargin="5">
		<FORM id="Form1" method="post" runat="server">
			<table class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr>
					<td class="Big"><IMG src="/images/menu/infofind.gif" align="absMiddle"><span class="big3">
							<asp:Literal id="litNavName" runat="server" Text="人员查询"></asp:Literal> </span>
					</td>
				</tr>
			</table>
			<asp:panel id="pnlMain" runat="server">
				<TABLE class="small" cellSpacing="1" cellPadding="3" width="450" align="center" bgColor="#000000"
					border="0">
					<TR>
						<TD class="TableData" noWrap>姓名：
						</TD>
						<TD class="TableData" noWrap>
							<asp:TextBox id="txtUserName" runat="server" Columns="10" MaxLength="20" CssClass="BigInput"></asp:TextBox></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>部门：</TD>
						<TD class="TableData" noWrap>
							<asp:DropDownList id="ddlDeptId" runat="server" CssClass="BigSelect"></asp:DropDownList></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>性别：</TD>
						<TD class="TableData" noWrap>
							<asp:DropDownList id="ddlSex" runat="server" CssClass="BigSelect">
								<asp:ListItem Value="ALL">所有</asp:ListItem>
								<asp:ListItem Value="True">男</asp:ListItem>
								<asp:ListItem Value="False">女</asp:ListItem>
							</asp:DropDownList></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>单位电话：
						</TD>
						<TD class="TableData" noWrap>
							<asp:TextBox id="txtTelNoDept" runat="server" MaxLength="25" CssClass="BigInput"></asp:TextBox></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>E-mail：
						</TD>
						<TD class="TableData" noWrap>
							<asp:TextBox id="txtEmail" runat="server" Columns="25" MaxLength="200" CssClass="BigInput"></asp:TextBox></TD>
					</TR>
					<TR>
						<TD class="TableControl" noWrap align="center" colSpan="2">&nbsp;
							<asp:Button id="btnSubmit" runat="server" CssClass="BigButton" Text="查询" ToolTip="查询用户"></asp:Button></TD>
					</TR>
				</TABLE>
			</asp:panel>
				<asp:Repeater id="rptUsers" runat="server" EnableViewState="False">
					<HeaderTemplate>
						<table border="0" cellspacing="1" width="100%" class="small" cellpadding="3" bgcolor="#000000">
							<tr class="TableHeader" align="center">
								<td nowrap><b>姓名</b></td>
								<td nowrap><b>性别</b></td>
								<td nowrap><b>部门</b></td>
								<td nowrap><b>在线时长</b></td>
								<td nowrap><b>角色</b></td>								
								<td nowrap><b>单位电话</b></td>
								<td nowrap><b>手机</b></td>
								<td nowrap><b>电子邮件</b></td>
							</tr>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1" align="center">
							<td nowrap><a href="/general/ipanel/user_info.aspx?user_id=<%#Eval("UserId")%>"><%#Eval("UserName")%></a></td>
							<td nowrap><%#Convert.ToBoolean(Eval("Sex")) == true ? "男" : "女"%></td>
							<td nowrap><%#Eval("DeptName")%></td>
							<td nowrap><%#Math.Floor(Convert.ToDouble(Eval( "OnlineTime").ToString()) / 60).ToString() + "小时" + Convert.ToString(Math.Floor(Convert.ToDouble(Eval( "OnlineTime").ToString())) % 60) + "分"%></td>
							<td nowrap><%#Eval("PrivName")%></td>
							<td nowrap><%#Eval("TelNoDept")%></td>
							<td nowrap><%#DisplayMobile(Convert.ToString(Eval("Mobile")), Convert.ToBoolean(Eval("IsHideMobile")))%></td>
							<td nowrap><a href="mailto:<%#Eval("Email")%>"><%#Eval("Email")%></a></td>
						</tr>
					</ItemTemplate>
					<AlternatingItemTemplate>
					<tr class="TableLine2" align="center">
							<td nowrap><a href="/general/ipanel/user_info.aspx?user_id=<%#Eval("UserId")%>"><%#Eval("UserName")%></a></td>
							<td nowrap><%#Convert.ToBoolean(Eval("Sex")) == true ? "男" : "女"%></td>
							<td nowrap><%#Eval("DeptName")%></td>
							<td nowrap><%#Math.Floor(Convert.ToDouble(Eval( "OnlineTime").ToString()) / 60).ToString() + "小时" + Convert.ToString(Math.Floor(Convert.ToDouble(Eval( "OnlineTime").ToString())) % 60) + "分"%></td>
							<td nowrap><%#Eval("PrivName")%></td>
							<td nowrap><%#Eval("TelNoDept")%></td>
							<td nowrap><%#DisplayMobile(Convert.ToString(Eval("Mobile")), Convert.ToBoolean(Eval("IsHideMobile")))%></td>
							<td nowrap><a href="mailto:<%#Eval("Email")%>"><%#Eval("Email")%></a></td>
						</tr>
					</AlternatingItemTemplate>
					<FooterTemplate>
						</table>
						<br>
						<center>
							<input type="button" class="BigButton" value="返回" onclick="window.location='query.aspx';">
						</center>
					</FooterTemplate>
				</asp:Repeater>			
			<asp:literal id="litMessage" runat="server"></asp:literal>
			</FORM>
	</BODY>
</HTML>
